<% include file="header.html" %>
		
		<div id="main-content"> <!-- Main Content Section with everything -->
			
			<script type="text/javascript">
				$(document).ready(function(){
					$("#callotherkws").click(function(){
						 $.getJSON(
									"?do=launch.moreKeywordsFromBaidu",
									{
										keywords:$("#keywords").val(),
										id: '<%$obj->id%>'
									},
									function(data){
										$("#otherkws").val(data['kws']);
										$("#articlenum").val(data['articlenum']);
										$("#articleList").val(data['articleList']);
										$("#intersectnum").val(data['intersectnum']);
									}                         
								 );
					})
				});
			</script>
			
			<!-- Page Head -->
			<h2>VBC广告</h2><p class="clear"></p>
			
			
			<ul class="shortcut-buttons-set" style="display:none;">
				
				<li><a class="shortcut-button" href="#"><span>
					<img src="images/icons/pencil_48.png" alt="icon" /><br />
					Write an Article
				</span></a></li>
				
				<li><a class="shortcut-button" href="#"><span>
					<img src="images/icons/paper_content_pencil_48.png" alt="icon" /><br />
					Create a New Page
				</span></a></li>
				
				<li><a class="shortcut-button" href="#"><span>
					<img src="images/icons/image_add_48.png" alt="icon" /><br />
					Upload an Image
				</span></a></li>
				
				<li><a class="shortcut-button" href="#"><span>
					<img src="images/icons/clock_48.png" alt="icon" /><br />
					Add an Event
				</span></a></li>
				
				<li><a class="shortcut-button" href="#messages" rel="modal"><span>
					<img src="images/icons/comment_48.png" alt="icon" /><br />
					Open Modal
				</span></a></li>
				
			</ul><!-- End .shortcut-buttons-set -->
			
			<div class="clear"></div> <!-- End .clear -->
			
			<div class="content-box"><!-- Start Content Box -->
				
				<div class="content-box-header">
					
					<h3>完善投放</h3>
					<div class="clear"></div>
					
				</div> <!-- End .content-box-header -->
				
				<div class="content-box-content">
					
					<div class="tab-content default-tab font_14" id="tab2">
						<div class="notification attention png_bg">
                            <a href="#" class="close"><img src="images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a>
                            <div>当前操作的提示以及警告信息！</div>
                
						</div>
						<form action="#" method="post" id="myform">
							
							<fieldset> <!-- Set class to "column-left" or "column-right" on fieldsets to divide the form into columns -->
								<input type="hidden" value="<%$obj->id%>" name="id" />
								<p><div class="row_name">投放名称：</div><input class="text-input little-input"  type="text" name="name" id="name" value="<% $obj->name %>" /> </p>
                                <p><div class="row_name">投放时间：</div><input class="text-input little-input" type="text" name="start" id="start" value="<% $obj->start %>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:00:00'})" /> <!-- Classes for input-notification: success, error, information, attention -->&nbsp;&nbsp;至&nbsp;&nbsp;<input class="text-input little-input" type="text" name="end" id="end" value="<% $obj->end %>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:00:00'})" /> <!-- Classes for input-notification: success, error, information, attention --></p>
                                 <p><div class="row_name">设置权重：</div><input class="text-input little-input" type="text" name="weight" id="weight" value="<% $obj->weight %>" /> <!-- Classes for input-notification: success, error, information, attention --></p>
								<script>
									function senddata(inputobj){
									var str="正在扩词：";
									var str1="...";
									var obj;
									obj=document.getElementById("outdiv");
									obj.innerHTML=str+inputobj.value+str1;
									}
								</script>
								<p><div class="row_name">关 键 词：</div><input class="text-input little-input" type="text" name="keywords" id="keywords" value="<% $obj->keywords %>" />&nbsp;&nbsp;&nbsp;<a href="#" class="underline" >导入</a><input id="callotherkws" class="button" type="button" value="搜索" style="margin-left:24px;" onclick="javascript:senddata(keywords);"/><br /><span class="gray" style="margin-left:6px; font-size:12px;">输入关键词，清用英文逗号分割多个关键词</span><div id="outdiv" class="gray" style=" margin:5px 0 0 80px; font-size:12px;"></div><!-- Classes for input-notification: success, error, information, attention --></p>
								<input type="hidden" name="otherkws" id="otherkws" value="<% $obj->otherkws %>"  />
								<input type="hidden" name="priority" id="priority" value="<% $obj->priority %>"  />
								<input type="hidden" name="size" id="size" value="<% $obj->size %>"  />
								<input type="hidden" name="status" id="status" value="<% $obj->status %>"  />
								
								<p><div class="row_name" style="text-align:left; line-height:20px; margin-top:-8px; width:78px; margin-left:-4px;">匹配到的文章数：</div><input class="text-input little-input" type="text" name="articlenum"  id="articlenum" value=""  readonly="readonly" /></p>
								<p><div class="row_name" style="text-align:left; line-height:20px; margin-top:-8px; width:90px; margin-left:-16px;">已经被投放的文章数：</div><input class="text-input little-input" type="text"  name="intersectnum" id="intersectnum" value="" readonly="readonly" /></p>
								<input type="hidden" name="articleList" id="articleList" value="" />
								<input type="hidden" name="articles" id="articles" value="<% $obj->articles %>" />
								<input type="hidden" name="order" id="order" value="<% $obj->order %>" />
								<input type="hidden" name="activity" id="activity" value="<% $obj->activity %>" />
								<input type="hidden" name="adsnum" id="adsnum" value="<% $obj->adsnum %>" />
								<!-- 
								<p>
									<label>匹配到的文章数</label>
                                    <div class="display_frame">
                                    	<p>搜索结果：</p>
                                        <div class="keyword_search">
                                            <p>关键词一</p>
                                            <p>GUCCI</p>
                                            <p>搜索结果</p>
                                            <p>1304项</p>
                                            <p>匹配到的广告位</p>
                                            <p>50项</p>
                                            <div>详细列表：</div>
                                        </div>
                                        <div class="keyword_search">
                                            <p>关键词二</p>
                                            <p>GUCCI香水</p>
                                            <p>搜索结果</p>
                                            <p>356项</p>
                                            <p>匹配到的广告位</p>
                                            <p>33项</p>
                                            <div>详细列表：</div>
                                        </div>
                                        <div class="keyword_search">
                                            <p>关键词二</p>
                                            <p>GUCCI饰品</p>
                                            <p>搜索结果</p>
                                            <p>354项</p>
                                            <p>匹配到的广告位</p>
                                            <p>23项</p>
                                            <div>详细列表：</div>
                                        </div>
                                    </div>
								</p>
								 -->
								
								<p><div class="row_name">投放量：</div><input class="text-input little-input" type="text" name="num" id="num" value="<% $obj->num %>"  /> <!-- Classes for input-notification: success, error, information, attention --></p>
								
								<!-- 
								<p>选择布局：</p>
                              			<% section name=obj loop=$adsList %>
                              			<p>
                              			ID: <% $adsList[obj]->id %> &nbsp;
                              			创意名:<%$adsList[obj]->name %> &nbsp;
										位置: <font style="color:red;"><%$adsList[obj]->layout %></font>
										<input type="hidden" name="layout_<% $adsList[obj]->id %>" value="<%$adsList[obj]->layout %>" />
		                              	</p>
                              			<%/section %>
                              			<input type="hidden" name="adsids" value="<% $adsids %>" />
                              	 -->
                              	
                              	<p>
                                	<label> 投放样式：</label>
                                </p>
								
								<div class="brand_style">
                                    <div class="brand_r">
                                    	<p>预览：</p>
                                		
                                		<% section name=obj loop=$adsList %>
                                		创意名称：<%$adsList[obj]->name%> <br />
                                		<iframe src="/d/preview.php?id=<%$adsList[obj]->id%>" style="height: 500px; width: 500px;" ></iframe>
                                		<%/section %>
                                    </div>
								</div>
								
								<p class="clear">
									<% if $op=='add' %>
									<input class="button" type="submit" value="完成"  onclick="fromsubmit('vbc','add')" style="margin-left:40px;" />
									<%else%>
									<input class="button" type="submit" value="完成"  onclick="fromsubmit('vbc','modify')" style="margin-left:40px;" />
									<%/if%>
								</p>
							</fieldset>
							
							<div class="clear"></div><!-- End .clear -->
							
						</form>
						
					</div> <!-- End #tab2 -->        
					
				</div> <!-- End .content-box-content -->
				
			</div> <!-- End .content-box -->
			
			<div class="clear"></div>
			
<% include file="footer.html" %>
